


export function forEach(array: Array, callback, start = 0, offset = 1) {
  const length = array.length;
  let index = start;
  for (; index < length; index += offset) {
    callback(array[index],index);
  }
}


// public initCanvasAni(res: any) {
//   if (this.canvas) return
//   this.canvas = res[0].node
//   const ctx = this.canvas.getContext('2d')
//   const renderLoop = () => {
//       // 您需要持续在后台调用的函数
//      this.AnimationFrameHandler()
//      this.canvas.requestAnimationFrame(renderLoop)
//   }
//   this.canvas.requestAnimationFrame(renderLoop)
// }